package com.msa.msaportal.service.impl;

import java.util.List;

import com.msa.msaportal.common.page.Pagination;
import com.msa.msaportal.dao.IPortalExampleDao;
import com.msa.msaportal.entity.PortalCssEntity;
import com.msa.msaportal.entity.PortalExample;
import com.msa.msaportal.entity.Portalfooter;
import com.msa.msaportal.entity.PortalheaderEntity;
import com.msa.msaportal.entity.PortletViewRes;
import com.msa.msaportal.entity.Template;
import com.msa.msaportal.service.IPortalExampleService;

public class PortalExampleServiceImpl implements IPortalExampleService {

	private IPortalExampleDao portalDao;
	
	
	
	public IPortalExampleDao getPortalDao() {
		return portalDao;
	}

	public void setPortalDao(IPortalExampleDao portalDao) {
		this.portalDao = portalDao;
	}

	/**
	 * 
	 */
	public PortalExample savePortal(PortalExample portalExample) {

		PortalExample portal = portalDao.savePortal(portalExample);
		return portal;
	}

	public List<Template> getTemplatelistByorgId(String orgId) {
		
		return portalDao.getTemplateListByOrgid(orgId);
	}

	@Override
	public Pagination findPortal(PortalExample portalExample,Integer pageNum, Integer pageCount) {
		
		return portalDao.findPortal(portalExample,pageNum,pageCount);
	}

	@Override
	public void deleteByPortalId(String portal_id) {
		portalDao.deleteByPortalId(portal_id);
		
	}

	@Override
	public void updatePortal(PortalExample portalExample) {
		
		portalDao.updatePortal(portalExample);
	}

@Override
public PortalExample findByPortalid(String portal_id) {
	
	return portalDao.findByPortalid(portal_id);
}

/*@Override
public Integer getCount() {
	return portalDao.getCount();
}*/

@Override
public List<PortalExample> getAll(Integer pageNum, Integer pageCount) {
	return  portalDao.getAll(pageNum,pageCount);
}

@Override
public List<PortalExample> getPortallistByorgCode(String orgCode) {
	// TODO Auto-generated method stub
	return portalDao.getPortalListByorgCode(orgCode);
}

@Override
public List<PortalExample> getPortalByOrgId(String json) {
	
	
	return portalDao.getPortalByOrgId(json);
}

@Override
public List<PortalExample> getPortalAll() {
	
	return portalDao.getPortalAll();
}

@Override
public List<PortletViewRes> getportletlistByorgCode(String orgCode) {
	// TODO Auto-generated method stub
	return portalDao.getportletResListByorgCode(orgCode);
}

@Override
public List<PortalExample> getPortalNumber() {
	return portalDao.getPortalNumber();
}




@Override
public List<PortalExample> getPortal() {
	
	return portalDao.getPortal();
}

@Override
public PortalCssEntity showPortalCss(Integer cssId) {
	return portalDao.showPortalCss(cssId);
	
	
}

@Override
public Template showPortalTemp(Integer template_id) {
	return portalDao.showPortalTemp(template_id);
}

@Override
public Portalfooter getFooterContent(Integer footerResId) {
	// TODO Auto-generated method stub
	return portalDao.getFooterContent(footerResId);
}

@Override
public PortalheaderEntity getPortalheaderEntity(Integer headerresid) {
	// TODO Auto-generated method stub
	return portalDao.getPortalheaderEntity(headerresid);
}





}
